import '../utils/api/http.dart';
import '../utils/tools/localstorage_tool.dart';
import '../bean/waterinvasion_bean.dart';

class WaterinVasion {

  /// 获取水浸监测信息
  /// * [par] Map|必填|台区id
  static Future reqWaterinVasionInfo(par) async {
    String token = await LocalStorage.getStringItem("token");
    var res = await HttpManager.getInstance().get("waterImmersionData/getNewestWaterImmersionData?token=${token}", params: par);
    if(res["data"] != null){
      return WaterinVasionBean.fromJsonList(res["data"]);
    } else{
      return null;
    }
  }
}
